package com.linkage.educloud.ah.mvp.model;

import com.linkage.educloud.ah.http.Method;
import com.linkage.educloud.ah.mvp.contract.IEduAppListContract;
import com.zhouyou.http.EasyHttp;
import com.zhouyou.http.callback.CallClazzProxy;
import com.zhouyou.http.model.ApiResult;
import com.zhouyou.http.model.HttpParams;

import io.reactivex.Observable;
import io.reactivex.schedulers.Schedulers;

/**
 * Created by Mr'Tang on 2018/12/19.
 */

public class EduAppListModel implements IEduAppListContract.IModel {
    @Override
    public Observable request(Method method, boolean isToken, HttpParams params) {
        return EasyHttp.post("")
                .params(params)
                .accessToken(isToken)
                .execute(new CallClazzProxy<ApiResult<String>, String>(String.class) {
                })
                .subscribeOn(Schedulers.io());
    }
}